import com.speljohan.rsbot.script.Random;
import com.speljohan.rsbot.script.wrappers.RSInterface;

public class WelcomeScreen extends Random {
	final static int WELCOME_SCREEN_ID = 378;
	final static int WELCOME_SCREEN_BUTTON_PLAY = 45;

	@Override
	public boolean activateCondition() {
		return RSInterface.getInterface(WelcomeScreen.WELCOME_SCREEN_ID)
				.isValid()
				&& !RSInterface.getInterface(WelcomeScreen.WELCOME_SCREEN_ID)
						.getChild(89).getText().contains("10.1120.190");
	}

	@Override
	public String getAuthor() {
		return "Qauters";
	}

	@Override
	public String getName() {
		return "Welcome Screen";
	}

	@Override
	public double getVersion() {
		return 1.1;
	}

	@Override
	public int loop() {
		atInterface(RSInterface.getInterface(WelcomeScreen.WELCOME_SCREEN_ID)
				.getChild(WelcomeScreen.WELCOME_SCREEN_BUTTON_PLAY));
		wait(random(500, 1000));
		return -1;
	}

}
